cmake_minimum_required(VERSION 3.0.2)
project(kybot_msg)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  actionlib
  actionlib_msgs
  std_msgs
  geometry_msgs
  roscpp
  sensor_msgs
  message_generation
)

################################################
## Declare ROS messages, services and actions ##
################################################

## Generate messages in the 'msg' folder
add_message_files(
  FILES
  yaw.msg
  # 精定位msg
  locationParams.msg
  setModel.msg
  # exception
  StateNotify.msg
  Exceptiontonavigation.msg
  # drive
  BaseInfo.msg
  Iap.msg
  IapEvent.msg
  StateNotify.msg
  SetChssisDriverMsg.msg
  # system
  SystemEvent.msg
  TaskInfo.msg
  TargetPose.msg
  NewTaskInfo.msg
  Nuc.msg
  SystemStatusInfo.msg
  ExceptionNotify.msg
  RobotRebootMsg.msg
  ArmControlMsg.msg
  DragArmControlMsg.msg
  EmergencyStopMsg.msg
  LightControlMsg.msg
  TaskPhotoControlMsg.msg
  CoaresScanning.msg
  HardTriggeringDataMsg.msg
  HardTriggeringDataMcuMsg.msg
)

## Generate services in the 'srv' folder
add_service_files(
  FILES
  # 精定位srv
  locationAlgoSrv.srv
  GetBogieAxleHeightSrv.srv
  getModelSrv.srv
  setModelSrv.srv
  SetTemplateModelSrv.srv
  GetFrontDeviationSrv.srv
  # exception
  exceptionNotifySrv.srv
  NodeInfoSrv.srv
  stopLocationSrv.srv
  # drive
  NodeInfoSrv.srv
  photographControl.srv
  GetMagneticDataSrv.srv
  # system
  GetSystemStatusSrv.srv
  TargetPoseNavigationControlSrv.srv
  PowerOffSrv.srv
  MoveControlSrv.srv
  SetCurrentPoseSrv.srv
  ChargeControlSrv.srv
  QueryPositionSrv.srv
  QueryMapSrv.srv
  QuerySystemNodeSrv.srv
  GetOdomSrv.srv
  SetChassisDriverSrv.srv
  GetLaserDataSrv.srv
  ResetControlSrv.srv
  RobotRebootSrv.srv
  ArmControlSrv.srv
  DragArmControlSrv.srv
  EmergencyStopSrv.srv
  GetAccuratelyLocationPoseSrv.srv
  RobotShutdownSrv.srv
  GetElecMapStatusSrv.srv
  CoaresScanningSrv.srv
  GetCurrentVersionSrv.srv
  NodeInfoSrv.srv
  SetPatrolNavigationDistanceSrv.srv
  UVLampControlSrv.srv
  # map
  GetActivedMapNameSrv.srv
  ActiveMapSrv.srv
  SetCurrentPoseSrv.srv
  GetChargeStationPoseSrv.srv
  SetChargeStationPoseSrv.srv
  GetCurrentModeSrv.srv
  GetLocationStatusSrv.srv
  StartLocalization.srv
  NodeInfoSrv.srv
  AddLandMark.srv
  SearchMapSrv.srv
  SwitchMapSrv.srv
)

## Generate actions in the 'action' folder
add_action_files(
  FILES
  AutoCharge.action
)

## Generate added messages and services with any dependencies listed here
generate_messages(
  DEPENDENCIES
  actionlib_msgs
  std_msgs
  sensor_msgs
  geometry_msgs
)

catkin_package(
   INCLUDE_DIRS #include
#  LIBRARIES kybot_msg
   CATKIN_DEPENDS actionlib actionlib_msgs std_msgs roscpp sensor_msgs message_runtime
#  DEPENDS system_lib
)


## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

install(DIRECTORY include/${PROJECT_NAME}/
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  PATTERN ".svn" EXCLUDE
)

# 设置安装目录 install 安装
# set(CMAKE_INSTALL_PREFIX "/home/kybot/kybot_ws/install")
# install(TARGETS ${PROJECT_NAME}_node                # 要安装的包的名称，由同文件中add_executable生成
# ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib     #静态库的安装路径
# LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib     #动态库的安装路径
# RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}    #可执行文件的安装路径
# PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE   #设置可执行文件的用户权限
# )
# #启动和配置文件目录
# install(DIRECTORY launch data param    # 要安装的目录可以自由增添
# DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}   #安装目录的目的路径
# )

